package com.jaywalkable.vkeyboard;

import static com.jaywalkable.vkeyboard.BengaliLetter.A;
import static com.jaywalkable.vkeyboard.BengaliLetter.AA;
import static com.jaywalkable.vkeyboard.BengaliLetter.AI;
import static com.jaywalkable.vkeyboard.BengaliLetter.AU;
import static com.jaywalkable.vkeyboard.BengaliLetter.BA;
import static com.jaywalkable.vkeyboard.BengaliLetter.BHA;
import static com.jaywalkable.vkeyboard.BengaliLetter.CA;
import static com.jaywalkable.vkeyboard.BengaliLetter.CHA;
import static com.jaywalkable.vkeyboard.BengaliLetter.DA;
import static com.jaywalkable.vkeyboard.BengaliLetter.DDA;
import static com.jaywalkable.vkeyboard.BengaliLetter.DDHA;
import static com.jaywalkable.vkeyboard.BengaliLetter.DHA;
import static com.jaywalkable.vkeyboard.BengaliLetter.E;
import static com.jaywalkable.vkeyboard.BengaliLetter.GA;
import static com.jaywalkable.vkeyboard.BengaliLetter.GANDA_MARK;
import static com.jaywalkable.vkeyboard.BengaliLetter.GHA;
import static com.jaywalkable.vkeyboard.BengaliLetter.HA;
import static com.jaywalkable.vkeyboard.BengaliLetter.I;
import static com.jaywalkable.vkeyboard.BengaliLetter.II;
import static com.jaywalkable.vkeyboard.BengaliLetter.JA;
import static com.jaywalkable.vkeyboard.BengaliLetter.JHA;
import static com.jaywalkable.vkeyboard.BengaliLetter.KA;
import static com.jaywalkable.vkeyboard.BengaliLetter.KHA;
import static com.jaywalkable.vkeyboard.BengaliLetter.KHANDA_TA;
import static com.jaywalkable.vkeyboard.BengaliLetter.LA;
import static com.jaywalkable.vkeyboard.BengaliLetter.MA;
import static com.jaywalkable.vkeyboard.BengaliLetter.NA;
import static com.jaywalkable.vkeyboard.BengaliLetter.NGA;
import static com.jaywalkable.vkeyboard.BengaliLetter.NNA;
import static com.jaywalkable.vkeyboard.BengaliLetter.NYA;
import static com.jaywalkable.vkeyboard.BengaliLetter.O;
import static com.jaywalkable.vkeyboard.BengaliLetter.PA;
import static com.jaywalkable.vkeyboard.BengaliLetter.PHA;
import static com.jaywalkable.vkeyboard.BengaliLetter.RA;
import static com.jaywalkable.vkeyboard.BengaliLetter.RHA;
import static com.jaywalkable.vkeyboard.BengaliLetter.RRA;
import static com.jaywalkable.vkeyboard.BengaliLetter.SA;
import static com.jaywalkable.vkeyboard.BengaliLetter.SHA;
import static com.jaywalkable.vkeyboard.BengaliLetter.SIGN_AA;
import static com.jaywalkable.vkeyboard.BengaliLetter.SIGN_AI;
import static com.jaywalkable.vkeyboard.BengaliLetter.SIGN_ANUSVARA;
import static com.jaywalkable.vkeyboard.BengaliLetter.SIGN_AU;
import static com.jaywalkable.vkeyboard.BengaliLetter.SIGN_CANDRABINDU;
import static com.jaywalkable.vkeyboard.BengaliLetter.SIGN_E;
import static com.jaywalkable.vkeyboard.BengaliLetter.SIGN_I;
import static com.jaywalkable.vkeyboard.BengaliLetter.SIGN_II;
import static com.jaywalkable.vkeyboard.BengaliLetter.SIGN_O;
import static com.jaywalkable.vkeyboard.BengaliLetter.SIGN_U;
import static com.jaywalkable.vkeyboard.BengaliLetter.SIGN_UU;
import static com.jaywalkable.vkeyboard.BengaliLetter.SIGN_VIRAMA;
import static com.jaywalkable.vkeyboard.BengaliLetter.SIGN_VISARGA;
import static com.jaywalkable.vkeyboard.BengaliLetter.SIGN_VOCALIC_R;
import static com.jaywalkable.vkeyboard.BengaliLetter.SSA;
import static com.jaywalkable.vkeyboard.BengaliLetter.TA;
import static com.jaywalkable.vkeyboard.BengaliLetter.THA;
import static com.jaywalkable.vkeyboard.BengaliLetter.TTA;
import static com.jaywalkable.vkeyboard.BengaliLetter.TTHA;
import static com.jaywalkable.vkeyboard.BengaliLetter.U;
import static com.jaywalkable.vkeyboard.BengaliLetter.UU;
import static com.jaywalkable.vkeyboard.BengaliLetter.VOCALIC_L;
import static com.jaywalkable.vkeyboard.BengaliLetter.VOCALIC_R;
import static com.jaywalkable.vkeyboard.BengaliLetter.YA;
import static com.jaywalkable.vkeyboard.BengaliLetter.YYA;

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Hashtable;
import java.util.Properties;
import java.util.ResourceBundle;

import com.jaywalkable.vkeyboard.impl.AbstractBengaliVKeyboardLayoutImpl;

public final class AvroPhoneticVKeyboardLayout extends AbstractBengaliVKeyboardLayoutImpl implements
        VKeyboardDictionarySupport {
    AvroPhoneticVKeyboardLayout() {
        layout.put(new Character[] { 'o' }, new Character[] {});
        layout.put(new Character[] { '`' }, new Character[] {});
        layout.put(new Character[] { '`', 'o' }, new Character[] { A });
        layout.put(new Character[] { 'a' }, new Character[] { AA });
        layout.put(new Character[] { '`', 'a' }, new Character[] { AA });
        layout.put(new Character[] { 'i' }, new Character[] { I });
        layout.put(new Character[] { '`', 'i' }, new Character[] { I });
        layout.put(new Character[] { '`', 'I' }, new Character[] { II });
        layout.put(new Character[] { 'I' }, new Character[] { II });
        layout.put(new Character[] { 'e', 'e' }, new Character[] { II });
        layout.put(new Character[] { '`', 'e' }, new Character[] { E });
        layout.put(new Character[] { '`', 'O', 'I' }, new Character[] { AI });
        layout.put(new Character[] { 'O' }, new Character[] { O });
        layout.put(new Character[] { '`', 'O' }, new Character[] { O });
        layout.put(new Character[] { 'u' }, new Character[] { U });
        layout.put(new Character[] { '`', 'u' }, new Character[] { U });
        layout.put(new Character[] { 'U' }, new Character[] { UU });
        layout.put(new Character[] { 'r', 'r', 'i' }, new Character[] { VOCALIC_R });
        layout.put(new Character[] { '`', 'r', 'r', 'i' }, new Character[] { VOCALIC_R });
        layout.put(new Character[] { 'W', 'R' }, new Character[] { VOCALIC_L });
        layout.put(new Character[] { '`', 'O', 'U' }, new Character[] { AU });
        layout.put(new Character[] { 'a' }, new Character[] { SIGN_AA });
        layout.put(new Character[] { 'a', '`' }, new Character[] { SIGN_AA });
        layout.put(new Character[] { 'i' }, new Character[] { SIGN_I });
        layout.put(new Character[] { 'i', '`' }, new Character[] { SIGN_I });
        layout.put(new Character[] { 'I' }, new Character[] { SIGN_II });
        layout.put(new Character[] { 'I', '`' }, new Character[] { SIGN_II });
        layout.put(new Character[] { 'e' }, new Character[] { SIGN_E });
        layout.put(new Character[] { 'e', '`' }, new Character[] { SIGN_E });
        layout.put(new Character[] { 'O', 'I' }, new Character[] { SIGN_AI });
        layout.put(new Character[] { 'O', 'I', '`' }, new Character[] { SIGN_AI });
        layout.put(new Character[] { 'O', '`' }, new Character[] { SIGN_O });
        layout.put(new Character[] { 'u', '`' }, new Character[] { SIGN_U });
        layout.put(new Character[] { 'o', 'o' }, new Character[] { SIGN_U });
        layout.put(new Character[] { 'o', 'o', '`' }, new Character[] { SIGN_U });
        layout.put(new Character[] { 'u', 'u' }, new Character[] { SIGN_UU });
        layout.put(new Character[] { 'u', 'u', '`' }, new Character[] { SIGN_UU });
        layout.put(new Character[] { 'O', 'U' }, new Character[] { SIGN_AU });
        layout.put(new Character[] { 'O', 'U', '`' }, new Character[] { SIGN_AU });
        layout.put(new Character[] { 'r', 'r', 'i' }, new Character[] { SIGN_VOCALIC_R });
        layout.put(new Character[] { 'r', 'r', 'i', '`' }, new Character[] { SIGN_VOCALIC_R });
        layout.put(new Character[] { 'k' }, new Character[] { KA });
        layout.put(new Character[] { 'k', 'h' }, new Character[] { KHA });
        layout.put(new Character[] { 'g' }, new Character[] { GA });
        layout.put(new Character[] { 'g', 'h' }, new Character[] { GHA });
        layout.put(new Character[] { 'N', 'g' }, new Character[] { NGA });
        layout.put(new Character[] { 'c' }, new Character[] { CA });
        layout.put(new Character[] { 'c', 'h' }, new Character[] { CHA });
        layout.put(new Character[] { 'j' }, new Character[] { JA });
        layout.put(new Character[] { 'j', 'h' }, new Character[] { JHA });
        layout.put(new Character[] { 'N', 'G' }, new Character[] { NYA });
        layout.put(new Character[] { 'T' }, new Character[] { TTA });
        layout.put(new Character[] { 'T', 'h' }, new Character[] { TTHA });
        layout.put(new Character[] { 'D' }, new Character[] { DDA });
        layout.put(new Character[] { 'D', 'h' }, new Character[] { DDHA });
        layout.put(new Character[] { 'N' }, new Character[] { NNA });
        layout.put(new Character[] { 't' }, new Character[] { TA });
        layout.put(new Character[] { 't', 'h' }, new Character[] { THA });
        layout.put(new Character[] { 'd' }, new Character[] { DA });
        layout.put(new Character[] { 'd', 'h' }, new Character[] { DHA });
        layout.put(new Character[] { 'n' }, new Character[] { NA });
        layout.put(new Character[] { 'p' }, new Character[] { PA });
        layout.put(new Character[] { 'f' }, new Character[] { PHA });
        layout.put(new Character[] { 'b' }, new Character[] { BA });
        layout.put(new Character[] { 'b', 'h' }, new Character[] { BHA });
        layout.put(new Character[] { 'v' }, new Character[] { BHA });
        layout.put(new Character[] { 'm' }, new Character[] { MA });
        layout.put(new Character[] { 'z' }, new Character[] { YA });
        layout.put(new Character[] { 'r' }, new Character[] { RA });
        layout.put(new Character[] { 'l' }, new Character[] { LA });
        layout.put(new Character[] { 's', 'h' }, new Character[] { SHA });
        layout.put(new Character[] { 'S', 'h' }, new Character[] { SSA });
        layout.put(new Character[] { 's' }, new Character[] { SA });
        layout.put(new Character[] { 'h' }, new Character[] { HA });
        layout.put(new Character[] { 'R' }, new Character[] { RRA });
        layout.put(new Character[] { 'R', 'h' }, new Character[] { RHA });
        layout.put(new Character[] { 'y' }, new Character[] { YYA });
        layout.put(new Character[] { 'a', 'y', 'a' }, new Character[] { YYA, SIGN_AA });
        layout.put(new Character[] { 'y', 'y' }, new Character[] { I, YYA });
        layout.put(new Character[] { 't', '`', '`' }, new Character[] { KHANDA_TA });
        layout.put(new Character[] { 'n', 'g' }, new Character[] { SIGN_ANUSVARA });
        layout.put(new Character[] { ':' }, new Character[] { SIGN_VISARGA });
        layout.put(new Character[] { '^' }, new Character[] { SIGN_CANDRABINDU });

        layout.put(new Character[] { '+' }, new Character[] { SIGN_VIRAMA });
        layout.put(new Character[] { '+', 'r' }, new Character[] { SIGN_VIRAMA, RA });
        layout.put(new Character[] { 'Y' }, new Character[] { YA });
        layout.put(new Character[] { 'Z' }, new Character[] { SIGN_VIRAMA, YA });
        layout.put(new Character[] { 'w' }, new Character[] { SIGN_VIRAMA, BA });
        layout.put(new Character[] { 'r', '+' }, new Character[] { RA, SIGN_VIRAMA });
        layout.put(new Character[] { 'H', 'H' }, new Character[] { SIGN_VIRAMA, ZERO_WIDTH_NON_JOINER });
        layout.put(new Character[] { '.' }, new Character[] { GANDA_MARK });

        layout.put(new Character[] { 'k', 'k' }, new Character[] { KA, SIGN_VIRAMA, KA });
        layout.put(new Character[] { 'k', 'T' }, new Character[] { KA, SIGN_VIRAMA, TTA });
        layout.put(new Character[] { 'k', 't' }, new Character[] { KA, SIGN_VIRAMA, TA });
        layout.put(new Character[] { 'k', 't', 'r' }, new Character[] { KA, SIGN_VIRAMA, TA, SIGN_VIRAMA, RA });
        layout.put(new Character[] { 'k', 'm' }, new Character[] { KA, SIGN_VIRAMA, MA });
        layout.put(new Character[] { 'k', 'y' }, new Character[] { KA, SIGN_VIRAMA, YA });
        layout.put(new Character[] { 'k', 'r' }, new Character[] { KA, SIGN_VIRAMA, RA });
        layout.put(new Character[] { 'k', 'l' }, new Character[] { KA, SIGN_VIRAMA, LA });
        layout.put(new Character[] { 'k', 'k', 'h' }, new Character[] { KA, SIGN_VIRAMA, SSA });
        layout.put(new Character[] { 'k', 'x' }, new Character[] { KA, SIGN_VIRAMA, SSA });
        layout.put(new Character[] { 'k', 'k', 'h', 'N' }, new Character[] { KA, SIGN_VIRAMA, SSA, SIGN_VIRAMA, NA });
        layout.put(new Character[] { 'k', 'x', 'N' }, new Character[] { KA, SIGN_VIRAMA, SSA, SIGN_VIRAMA, NA });
        layout.put(new Character[] { 'k', 'k', 'h', 'y' }, new Character[] { KA, SIGN_VIRAMA, SSA, SIGN_VIRAMA, YA });
        layout.put(new Character[] { 'k', 'x', 'y' }, new Character[] { KA, SIGN_VIRAMA, SSA, SIGN_VIRAMA, YA });
        layout.put(new Character[] { 'k', 'h', 'y' }, new Character[] { KHA, SIGN_VIRAMA, YA });
        layout.put(new Character[] { 'k', 'h', 'r' }, new Character[] { KHA, SIGN_VIRAMA, RA });
        layout.put(new Character[] { 'g', 'N' }, new Character[] { GA, SIGN_VIRAMA, NNA });
        layout.put(new Character[] { 'g', 'd', 'h' }, new Character[] { GA, SIGN_VIRAMA, DHA });
        layout.put(new Character[] { 'N', 'g', 'm' }, new Character[] { NGA, SIGN_VIRAMA, MA });
        layout.put(new Character[] { 'c', 'c' }, new Character[] { CA, SIGN_VIRAMA, CA });
        layout.put(new Character[] { 'c', 'c', 'h' }, new Character[] { CA, SIGN_VIRAMA, CHA });
        layout.put(new Character[] { 'c', 'c', 'h', 'r' }, new Character[] { CA, SIGN_VIRAMA, CHA, SIGN_VIRAMA, RA });
        layout.put(new Character[] { 'c', 'N', 'G' }, new Character[] { CA, SIGN_VIRAMA, NYA });
        layout.put(new Character[] { 'c', 'y' }, new Character[] { CA, SIGN_VIRAMA, YA });
        layout.put(new Character[] { 'j', 'j' }, new Character[] { JA, SIGN_VIRAMA, JA });
        layout.put(new Character[] { 'j', 'j', 'h' }, new Character[] { JA, SIGN_VIRAMA, JHA });
        layout.put(new Character[] { 'g', 'g' }, new Character[] { NGA, SIGN_VIRAMA, GA });
        layout.put(new Character[] { 'j', 'N', 'G' }, new Character[] { NGA, SIGN_VIRAMA, GA });
        layout.put(new Character[] { 'j', 'y' }, new Character[] { JA, SIGN_VIRAMA, YA });
        layout.put(new Character[] { 'j', 'r' }, new Character[] { JA, SIGN_VIRAMA, RA });
        layout.put(new Character[] { 'n', 'c' }, new Character[] { NYA, SIGN_VIRAMA, CA });
        layout.put(new Character[] { 'n', 'c', 'h' }, new Character[] { NYA, SIGN_VIRAMA, CHA });
        layout.put(new Character[] { 'N', 'G', 'c', 'h' }, new Character[] { NYA, SIGN_VIRAMA, CHA });
        layout.put(new Character[] { 'n', 'j' }, new Character[] { NYA, SIGN_VIRAMA, JA });
        layout.put(new Character[] { 'n', 'j', 'h' }, new Character[] { NYA, SIGN_VIRAMA, JHA });
        layout.put(new Character[] { 'N', 'G', 'j', 'h' }, new Character[] { NYA, SIGN_VIRAMA, JHA });
        layout.put(new Character[] { 'T', 'T' }, new Character[] { TTA, SIGN_VIRAMA, TTA });
        layout.put(new Character[] { 't', 't' }, new Character[] { TA, SIGN_VIRAMA, TA });
        layout.put(new Character[] { 't', 't', 'h' }, new Character[] { TA, SIGN_VIRAMA, THA });
        layout.put(new Character[] { 't', 'n' }, new Character[] { TA, SIGN_VIRAMA, NA });
        layout.put(new Character[] { 't', 'm' }, new Character[] { TA, SIGN_VIRAMA, MA });
        layout.put(new Character[] { 't', 'm', 'y' }, new Character[] { TA, SIGN_VIRAMA, MA, SIGN_VIRAMA, YA });
        layout.put(new Character[] { 't', 'r' }, new Character[] { TA, SIGN_VIRAMA, RA });
        layout.put(new Character[] { 't', 'h', 'y' }, new Character[] { THA, SIGN_VIRAMA, YA });
        layout.put(new Character[] { 't', 'h', 'r' }, new Character[] { THA, SIGN_VIRAMA, RA });
        layout.put(new Character[] { 'd', 'g' }, new Character[] { DA, SIGN_VIRAMA, GA });
        layout.put(new Character[] { 'd', 'g', 'h' }, new Character[] { DA, SIGN_VIRAMA, GHA });
        layout.put(new Character[] { 'd', 'd' }, new Character[] { DA, SIGN_VIRAMA, DA });
        layout.put(new Character[] { 'd', 'v' }, new Character[] { DA, SIGN_VIRAMA, BHA });
        layout.put(new Character[] { 'd', 'b', 'h' }, new Character[] { DA, SIGN_VIRAMA, BHA });
        layout.put(new Character[] { 'd', 'm' }, new Character[] { DA, SIGN_VIRAMA, MA });
        layout.put(new Character[] { 'd', 'y' }, new Character[] { DA, SIGN_VIRAMA, YA });
        layout.put(new Character[] { 'd', 'r' }, new Character[] { DA, SIGN_VIRAMA, RA });
        layout.put(new Character[] { 'n', 'm' }, new Character[] { NA, SIGN_VIRAMA, MA });
        layout.put(new Character[] { 'n', 'y' }, new Character[] { NA, SIGN_VIRAMA, YA });
        layout.put(new Character[] { 'n', 's' }, new Character[] { NA, SIGN_VIRAMA, SA });
        layout.put(new Character[] { 'p', 'T' }, new Character[] { PA, SIGN_VIRAMA, TTA });
        layout.put(new Character[] { 'p', 't' }, new Character[] { PA, SIGN_VIRAMA, TA });
        layout.put(new Character[] { 'p', 'n' }, new Character[] { PA, SIGN_VIRAMA, NA });
        layout.put(new Character[] { 'p', 'p' }, new Character[] { PA, SIGN_VIRAMA, PA });
        layout.put(new Character[] { 'p', 'y' }, new Character[] { PA, SIGN_VIRAMA, YA });
        layout.put(new Character[] { 'p', 'r' }, new Character[] { PA, SIGN_VIRAMA, RA });
        layout.put(new Character[] { 'p', 'l' }, new Character[] { PA, SIGN_VIRAMA, LA });
        layout.put(new Character[] { 'p', 's' }, new Character[] { PA, SIGN_VIRAMA, SA });

        layout.put(new Character[] { 'f', 'l' }, new Character[] { PHA, SIGN_VIRAMA, LA });
        layout.put(new Character[] { 'p', 'h', 'l' }, new Character[] { PHA, SIGN_VIRAMA, LA });
        layout.put(new Character[] { 'b', 'j' }, new Character[] { BA, SIGN_VIRAMA, JA });
        layout.put(new Character[] { 'b', 'd' }, new Character[] { BA, SIGN_VIRAMA, DA });
        layout.put(new Character[] { 'b', 'd', 'h' }, new Character[] { BA, SIGN_VIRAMA, DHA });
        layout.put(new Character[] { 'b', 'b' }, new Character[] { BA, SIGN_VIRAMA, BA });
        layout.put(new Character[] { 'b', 'y' }, new Character[] { BA, SIGN_VIRAMA, YA });
        layout.put(new Character[] { 'b', 'r' }, new Character[] { BA, SIGN_VIRAMA, RA });
        layout.put(new Character[] { 'b', 'l' }, new Character[] { BA, SIGN_VIRAMA, LA });
        layout.put(new Character[] { 'l', 'T' }, new Character[] { LA, SIGN_VIRAMA, TTA });
        layout.put(new Character[] { 'l', 'D' }, new Character[] { LA, SIGN_VIRAMA, DDA });
        layout.put(new Character[] { 'l', 'd', 'h' }, new Character[] { LA, SIGN_VIRAMA, DHA });
        layout.put(new Character[] { 'l', 'p' }, new Character[] { LA, SIGN_VIRAMA, PA });
        layout.put(new Character[] { 'l', 'b' }, new Character[] { LA, SIGN_VIRAMA, BA });
        layout.put(new Character[] { 'l', 'v' }, new Character[] { LA, SIGN_VIRAMA, BHA });
        layout.put(new Character[] { 'l', 'b', 'h' }, new Character[] { LA, SIGN_VIRAMA, BHA });
        layout.put(new Character[] { 'l', 'm' }, new Character[] { LA, SIGN_VIRAMA, MA });
        layout.put(new Character[] { 'l', 'y' }, new Character[] { LA, SIGN_VIRAMA, YA });
        layout.put(new Character[] { 'l', 'l' }, new Character[] { LA, SIGN_VIRAMA, LA });
        layout.put(new Character[] { 's', 'c', 'h' }, new Character[] { SHA, SIGN_VIRAMA, CA });
        layout.put(new Character[] { 's', 'h', 'c', 'h' }, new Character[] { SHA, SIGN_VIRAMA, CHA });
        layout.put(new Character[] { 'S', 'c', 'h' }, new Character[] { SHA, SIGN_VIRAMA, CHA });
        layout.put(new Character[] { 's', 'h', 't' }, new Character[] { SHA, SIGN_VIRAMA, TA });
        layout.put(new Character[] { 'S', 't' }, new Character[] { SHA, SIGN_VIRAMA, TA });
        layout.put(new Character[] { 's', 'h', 'n' }, new Character[] { SHA, SIGN_VIRAMA, NA });
        layout.put(new Character[] { 'S', 'n' }, new Character[] { SHA, SIGN_VIRAMA, NA });
        layout.put(new Character[] { 's', 'h', 'm' }, new Character[] { SHA, SIGN_VIRAMA, MA });
        layout.put(new Character[] { 'S', 'm' }, new Character[] { SHA, SIGN_VIRAMA, MA });
        layout.put(new Character[] { 's', 'h', 'y' }, new Character[] { SHA, SIGN_VIRAMA, YA });
        layout.put(new Character[] { 'S', 'y' }, new Character[] { SHA, SIGN_VIRAMA, YA });
        layout.put(new Character[] { 's', 'h', 'r' }, new Character[] { SHA, SIGN_VIRAMA, RA });
        layout.put(new Character[] { 'S', 'r' }, new Character[] { SHA, SIGN_VIRAMA, RA });
        layout.put(new Character[] { 's', 'h', 'l' }, new Character[] { SHA, SIGN_VIRAMA, LA });
        layout.put(new Character[] { 'S', 'l' }, new Character[] { SHA, SIGN_VIRAMA, LA });

        layout.put(new Character[] { 'S', 'h', 'k' }, new Character[] { SSA, SIGN_VIRAMA, KA });
        layout.put(new Character[] { 'S', 'h', 'k', 'r' }, new Character[] { SHA, SIGN_VIRAMA, KA, SIGN_VIRAMA, RA });
        layout.put(new Character[] { 'S', 'h', 'T' }, new Character[] { SSA, SIGN_VIRAMA, TTA });
        layout.put(new Character[] { 's', 'f' }, new Character[] { SA, SIGN_VIRAMA, PHA });
        layout.put(new Character[] { 's', 'p', 'h' }, new Character[] { SA, SIGN_VIRAMA, PHA });
        layout.put(new Character[] { 's', 'm' }, new Character[] { SA, SIGN_VIRAMA, MA });
        layout.put(new Character[] { 's', 'y' }, new Character[] { SA, SIGN_VIRAMA, YA });
        layout.put(new Character[] { 's', 'r' }, new Character[] { SA, SIGN_VIRAMA, RA });
        layout.put(new Character[] { 's', 'l' }, new Character[] { SA, SIGN_VIRAMA, LA });
        layout.put(new Character[] { 's', 'k', 'l' }, new Character[] { SA, SIGN_VIRAMA, KA, SIGN_VIRAMA, LA });
        layout.put(new Character[] { 'h', 'N' }, new Character[] { HA, SIGN_VIRAMA, NA });
        layout.put(new Character[] { 'h', 'n' }, new Character[] { HA, SIGN_VIRAMA, NNA });

        layout.put(new Character[] { 'g', 'n' }, new Character[] { GA, SIGN_VIRAMA, NA });
        layout.put(new Character[] { 'g', 'n', 'y' }, new Character[] { GA, SIGN_VIRAMA, NA, SIGN_VIRAMA, YA });
        layout.put(new Character[] { 'g', 'm' }, new Character[] { GA, SIGN_VIRAMA, MA });
        layout.put(new Character[] { 'g', 'y' }, new Character[] { GA, SIGN_VIRAMA, YA });
        layout.put(new Character[] { 'g', 'r' }, new Character[] { GA, SIGN_VIRAMA, RA });
        layout.put(new Character[] { 'g', 'l' }, new Character[] { GA, SIGN_VIRAMA, LA });
        layout.put(new Character[] { 'g', 'h', 'n' }, new Character[] { GHA, SIGN_VIRAMA, NA });
        layout.put(new Character[] { 'g', 'h', 'y' }, new Character[] { GHA, SIGN_VIRAMA, YA });
        layout.put(new Character[] { 'g', 'h', 'r' }, new Character[] { GHA, SIGN_VIRAMA, RA });
        layout.put(new Character[] { 'n', 'k' }, new Character[] { NGA, SIGN_VIRAMA, KA });
        layout.put(new Character[] { 'n', 'k', 'y' }, new Character[] { NGA, SIGN_VIRAMA, KA, SIGN_VIRAMA, YA });
        layout.put(new Character[] { 'N', 'g', 'K', 'y' }, new Character[] { NGA, SIGN_VIRAMA, KA, SIGN_VIRAMA, YA });
        layout.put(new Character[] { 'N', 'g', 'k', 'k', 'h' }, new Character[] { NGA, SIGN_VIRAMA, KA, SIGN_VIRAMA,
                SSA });
        layout.put(new Character[] { 'N', 'g', 'k', 'x' }, new Character[] { NGA, SIGN_VIRAMA, KA, SIGN_VIRAMA, SSA });
        layout.put(new Character[] { 'N', 'g', 'k', 'h' }, new Character[] { NGA, SIGN_VIRAMA, KHA });

        layout.put(new Character[] { 'N', 'g', 'g' }, new Character[] { NGA, SIGN_VIRAMA, GA });
        layout.put(new Character[] { 'N', 'g', 'g', 'y' }, new Character[] { NGA, SIGN_VIRAMA, GA, SIGN_VIRAMA, YA });
        layout.put(new Character[] { 'N', 'g', 'g', 'h' }, new Character[] { NGA, SIGN_VIRAMA, GHA });
        layout.put(new Character[] { 'N', 'g', 'g', 'h', 'y' }, new Character[] { NGA, SIGN_VIRAMA, GHA, SIGN_VIRAMA,
                YA });
        layout.put(new Character[] { 'N', 'g', 'g', 'h', 'r' }, new Character[] { NGA, SIGN_VIRAMA, GHA, SIGN_VIRAMA,
                RA });
        layout.put(new Character[] { 'T', 'm' }, new Character[] { TTA, SIGN_VIRAMA, MA });
        layout.put(new Character[] { 'T', 'y' }, new Character[] { TTA, SIGN_VIRAMA, YA });
        layout.put(new Character[] { 'T', 'r' }, new Character[] { TTA, SIGN_VIRAMA, RA });
        layout.put(new Character[] { 'D', 'D' }, new Character[] { DDA, SIGN_VIRAMA, DDA });
        layout.put(new Character[] { 'D', 'y' }, new Character[] { DDA, SIGN_VIRAMA, YA });
        layout.put(new Character[] { 'D', 'r' }, new Character[] { DDA, SIGN_VIRAMA, RA });

        layout.put(new Character[] { 'D', 'h', 'y' }, new Character[] { DDHA, SIGN_VIRAMA, YA });
        layout.put(new Character[] { 'D', 'h', 'r' }, new Character[] { DDHA, SIGN_VIRAMA, RA });
        layout.put(new Character[] { 'N', 'T' }, new Character[] { NNA, SIGN_VIRAMA, TTA });
        layout.put(new Character[] { 'N', 'T', 'h' }, new Character[] { NNA, SIGN_VIRAMA, TTHA });
        layout.put(new Character[] { 'N', 'D' }, new Character[] { NNA, SIGN_VIRAMA, DDA });
        layout.put(new Character[] { 'N', 'D', 'y' }, new Character[] { NNA, SIGN_VIRAMA, DDA, SIGN_VIRAMA, YA });
        layout.put(new Character[] { 'N', 'D', 'r' }, new Character[] { NNA, SIGN_VIRAMA, DDA, SIGN_VIRAMA, RA });
        layout.put(new Character[] { 'N', 'D', 'h' }, new Character[] { NNA, SIGN_VIRAMA, DDHA });
        layout.put(new Character[] { 'N', 'n' }, new Character[] { NNA, SIGN_VIRAMA, NA });
        layout.put(new Character[] { 'N', 'm' }, new Character[] { NNA, SIGN_VIRAMA, MA });
        layout.put(new Character[] { 'N', 'y' }, new Character[] { NNA, SIGN_VIRAMA, YA });
        layout.put(new Character[] { 'd', 'h', 'n' }, new Character[] { DHA, SIGN_VIRAMA, NA });
        layout.put(new Character[] { 'd', 'h', 'm' }, new Character[] { DHA, SIGN_VIRAMA, MA });
        layout.put(new Character[] { 'd', 'h', 'y' }, new Character[] { DHA, SIGN_VIRAMA, YA });
        layout.put(new Character[] { 'd', 'h', 'r' }, new Character[] { DHA, SIGN_VIRAMA, RA });

        layout.put(new Character[] { 'n', 'T' }, new Character[] { NA, SIGN_VIRAMA, TTA });
        layout.put(new Character[] { 'n', 'T', 'h' }, new Character[] { NA, SIGN_VIRAMA, THA });
        layout.put(new Character[] { 'n', 'D' }, new Character[] { NA, SIGN_VIRAMA, DDA });
        layout.put(new Character[] { 'n', 't', }, new Character[] { NA, SIGN_VIRAMA, TA });
        layout.put(new Character[] { 'n', 't', 'y' }, new Character[] { NA, SIGN_VIRAMA, TA, SIGN_VIRAMA, YA });
        layout.put(new Character[] { 'n', 't', 'r' }, new Character[] { NA, SIGN_VIRAMA, TA, SIGN_VIRAMA, RA });
        layout.put(new Character[] { 'N', 't', 'h' }, new Character[] { NA, SIGN_VIRAMA, THA });
        layout.put(new Character[] { 'n', 'd' }, new Character[] { NA, SIGN_VIRAMA, DA });
        layout.put(new Character[] { 'n', 'd', 'y' }, new Character[] { NA, SIGN_VIRAMA, DA, SIGN_VIRAMA, YA });
        layout.put(new Character[] { 'n', 'd', 'r' }, new Character[] { NA, SIGN_VIRAMA, DA, SIGN_VIRAMA, RA });
        layout.put(new Character[] { 'n', 'd', 'h' }, new Character[] { NA, SIGN_VIRAMA, DHA });
        layout.put(new Character[] { 'n', 'd', 'h', 'y' }, new Character[] { NA, SIGN_VIRAMA, DHA, SIGN_VIRAMA, YA });
        layout.put(new Character[] { 'n', 'd', 'h', 'r' }, new Character[] { NA, SIGN_VIRAMA, DHA, SIGN_VIRAMA, RA });
        layout.put(new Character[] { 'n', 'n' }, new Character[] { NA, SIGN_VIRAMA, NA });
        layout.put(new Character[] { 'v', 'y' }, new Character[] { BHA, SIGN_VIRAMA, YA });
        layout.put(new Character[] { 'b', 'h', 'y' }, new Character[] { BHA, SIGN_VIRAMA, YA });
        layout.put(new Character[] { 'v', 'r' }, new Character[] { BHA, SIGN_VIRAMA, RA });
        layout.put(new Character[] { 'b', 'h', 'r' }, new Character[] { BHA, SIGN_VIRAMA, RA });
        layout.put(new Character[] { 'v', 'l' }, new Character[] { BHA, SIGN_VIRAMA, LA });
        layout.put(new Character[] { 'b', 'h', 'l' }, new Character[] { BHA, SIGN_VIRAMA, LA });
        layout.put(new Character[] { 'm', 't', 'h' }, new Character[] { MA, SIGN_VIRAMA, THA });

        layout.put(new Character[] { 'm', 'n' }, new Character[] { MA, SIGN_VIRAMA, NA });
        layout.put(new Character[] { 'm', 'p' }, new Character[] { MA, SIGN_VIRAMA, PA });
        layout.put(new Character[] { 'm', 'p', 'r' }, new Character[] { MA, SIGN_VIRAMA, PA, SIGN_VIRAMA, RA });
        layout.put(new Character[] { 'm', 'f' }, new Character[] { MA, SIGN_VIRAMA, PHA });
        layout.put(new Character[] { 'm', 'p', 'h' }, new Character[] { MA, SIGN_VIRAMA, PHA });
        layout.put(new Character[] { 'm', 'b' }, new Character[] { MA, SIGN_VIRAMA, BA });
        layout.put(new Character[] { 'm', 'v' }, new Character[] { MA, SIGN_VIRAMA, BHA });
        layout.put(new Character[] { 'm', 'b', 'h' }, new Character[] { MA, SIGN_VIRAMA, BHA });
        layout.put(new Character[] { 'm', 'v', 'r' }, new Character[] { MA, SIGN_VIRAMA, BHA, SIGN_VIRAMA, RA });
        layout.put(new Character[] { 'm', 'b', 'h', 'r' }, new Character[] { MA, SIGN_VIRAMA, BHA, SIGN_VIRAMA, RA });
        layout.put(new Character[] { 'm', 'm' }, new Character[] { MA, SIGN_VIRAMA, MA });
        layout.put(new Character[] { 'm', 'y' }, new Character[] { MA, SIGN_VIRAMA, YA });
        layout.put(new Character[] { 'm', 'r' }, new Character[] { MA, SIGN_VIRAMA, RA });
        layout.put(new Character[] { 'm', 'l' }, new Character[] { MA, SIGN_VIRAMA, LA });
        layout.put(new Character[] { 'z', 'y' }, new Character[] { YA, SIGN_VIRAMA, YA });
        layout.put(new Character[] { 'r', 'r' }, new Character[] { RA, SIGN_VIRAMA });
        layout.put(new Character[] { 'l', 'k' }, new Character[] { LA, SIGN_VIRAMA, KA });

        layout.put(new Character[] { 'l', 'g' }, new Character[] { LA, SIGN_VIRAMA, GA });
        layout.put(new Character[] { 'S', 'h', 'T', 'y' }, new Character[] { SSA, SIGN_VIRAMA, TTA, SIGN_VIRAMA, YA });
        layout.put(new Character[] { 'S', 'h', 'T', 'r' }, new Character[] { SSA, SIGN_VIRAMA, TTA, SIGN_VIRAMA, RA });
        layout.put(new Character[] { 'S', 'h', 'T', 'h' }, new Character[] { SSA, SIGN_VIRAMA, TTHA });
        layout.put(new Character[] { 'S', 'h', 'T', 'h', 'y' }, new Character[] { SSA, SIGN_VIRAMA, TTHA, SIGN_VIRAMA,
                YA });
        layout.put(new Character[] { 'S', 'h', 'N' }, new Character[] { SSA, SIGN_VIRAMA, YYA });
        layout.put(new Character[] { 'S', 'h', 'p' }, new Character[] { SSA, SIGN_VIRAMA, PA });
        layout.put(new Character[] { 'S', 'h', 'p', 'r' }, new Character[] { SSA, SIGN_VIRAMA, PA, SIGN_VIRAMA, RA });
        layout.put(new Character[] { 'S', 'h', 'p', 'h' }, new Character[] { SSA, SIGN_VIRAMA, PHA });
        layout.put(new Character[] { 'S', 'h', 'f' }, new Character[] { SSA, SIGN_VIRAMA, PHA });
        layout.put(new Character[] { 's', 'h', 'm' }, new Character[] { SSA, SIGN_VIRAMA, MA });
        layout.put(new Character[] { 's', 'k' }, new Character[] { SA, SIGN_VIRAMA, KA });
        layout.put(new Character[] { 's', 'k', 'r' }, new Character[] { SA, SIGN_VIRAMA, KA, SIGN_VIRAMA, RA });
        layout.put(new Character[] { 's', 'T' }, new Character[] { SA, SIGN_VIRAMA, TTA });
        layout.put(new Character[] { 's', 'T', 'r' }, new Character[] { SA, SIGN_VIRAMA, TTA, SIGN_VIRAMA, RA });
        layout.put(new Character[] { 's', 'k', 'h' }, new Character[] { SA, SIGN_VIRAMA, KHA });
        layout.put(new Character[] { 's', 't' }, new Character[] { SA, SIGN_VIRAMA, TA });
        layout.put(new Character[] { 's', 't', 'y' }, new Character[] { SA, SIGN_VIRAMA, TA, SIGN_VIRAMA, YA });
        layout.put(new Character[] { 's', 't', 'h' }, new Character[] { SA, SIGN_VIRAMA, THA });
        layout.put(new Character[] { 's', 't', 'h', 'y' }, new Character[] { SA, SIGN_VIRAMA, THA, SIGN_VIRAMA, YA });
        layout.put(new Character[] { 's', 'n' }, new Character[] { SA, SIGN_VIRAMA, NA });
        layout.put(new Character[] { 's', 'p' }, new Character[] { SA, SIGN_VIRAMA, PA });
    }

    @Override
    public Character getSeparatorChar() {
        return 'o';
    }

    @Override
    public Hashtable<String, String> loadDictionary() {
        Hashtable<String, String> dict = new Hashtable<String, String>();
        Properties properties = new Properties();
        try {
            properties.load(getClass().getClassLoader().getResourceAsStream("autodict.dct"));
            for (Object obj : properties.keySet()) {
                String key = (String) obj;
                dict.put(key, (String) properties.getProperty(key));
            }
        } catch (IOException e) {
            throw new RuntimeException(e.getMessage());
        }

        return dict;
    }

    @Override
    public String transformVowel(Character preceedingChar, Character ch) {
        if (isVowel(ch)) {
            if (preceedingChar == null) {
                return null;
            }else if (!isVowel(preceedingChar)) {
                return String.valueOf('`');
            } else {
                if (ch.equals(AA)) {
                    return "ya";
                }
            }
        } else {
            if (preceedingChar == null) {
                if (ch.equals(YYA)) {
                    return "y";
                }
            }
        }
        return null;
    }

}
